from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^register/$', views.RegisterView.as_view(), name='register'),  # 当使用get方法 post方法请求时 统统都是这个url
    url(r'^usernames/(?P<username>[a-zA-Z0-9_]{5,20})/count/$', views.UsernameContView.as_view(), name='user_count'),
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view(), name='mobile_count'),
    url(r'^login/$', views.LoginView.as_view(), name='login'),  # 用户登录的url
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),  # 退出登录的url
    url(r'^usercenter/$', views.UserCenterView.as_view(), name='user_center'),  # 显示用户中心的url
    url(r'^emails/$', views.EmailView.as_view(), name='emails'),  # emails
    url(r'^address/$', views.AddressView.as_view(), name='address'),  # 用户收货地址界面的url
    url(r'^password/$', views.ChangePasswordView.as_view(), name='password'),  # 用户修改密码界面的url
    url(r'^browse_histories/$', views.UserBrowseHistory.as_view(), name='history'),  # 用户浏览记录
]
